﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ywxt.NewsPush.Models
{
    /// <summary>
    /// Controller返回的JSON数据的公共类
    /// </summary>
    public class clsCommonJsonResult
    {
        //-----------------------------------------2018-10-10-小覃增加的代码--------------------------------------------
        /// <summary>
        /// 返回的数据记录
        /// </summary>
        public int RecordCount { get; set; }

        /// <summary>
        /// 返回数据的页索引
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 返回数据的每页记录数
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 返回数据的页数
        /// </summary>
        public int PageCount { get; set; }

        //-----------------------------------------2018-10-10-小覃增加的代码--------------------------------------------


        /// <summary>
        /// 是否成功标志
        /// </summary>
        public bool ISOK { get; set; }

        /// <summary>
        /// 结果信息，当执行错误时，返回的是错误信息和代码。
        /// </summary>
        public string MESSAGE { get; set; }

        public clsCommonJsonResult()
        {
            ISOK = true;
            MESSAGE = string.Empty;
        }

        /// <summary>
        /// 返回一个错误的返回基础类型
        /// </summary>
        /// <param name="ErrorMessage">错误信息</param>
        public clsCommonJsonResult(string ErrorMessage)
        {
            ISOK = false;
            MESSAGE = ErrorMessage;
        }
    }
}